//
//  CommunityCollectionViewCell.m
//  LNA
//
//  Created by dllo on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com蓝鸥. All rights reserved.
//

#import "CommunityCollectionViewCell.h"

@implementation CommunityCollectionViewCell

- (void)dealloc
{
    
    [_imgView release];
    
    [super dealloc];
    
    
    
}

// 初始化
- (instancetype) initWithFrame:(CGRect)frame
{
    
    self = [super initWithFrame:frame];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
//        _imgView.backgroundColor = [UIColor yellowColor];
        _imgView.layer.cornerRadius = 10;
        _imgView.clipsToBounds = YES;
        [self.contentView addSubview:_imgView];
        
        self.tieziLabel = [[UILabel alloc] init];
//        _tieziLabel.backgroundColor = [UIColor redColor];
        _tieziLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_tieziLabel];
        
        self.titleLabel = [[UILabel alloc] init];
//        _titleLabel.backgroundColor = [UIColor greenColor];
        _titleLabel.font = [UIFont systemFontOfSize:11];
        _titleLabel.numberOfLines = 2;
        [self.contentView addSubview:_titleLabel];
        
        
    
    }
    return self;
}
// 布局方法
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{

    _imgView.frame = CGRectMake(0, 0, 50, layoutAttributes.size.height);
    _titleLabel.frame = CGRectMake(60, 0, 100, 28);
    _tieziLabel.frame = CGRectMake(60, 28, 100, 10);
    
    
    
    
}

@end
